<?php
session_start();
require_once(ABSPATH . 'wp-admin/includes/user.php');
require_once(ABSPATH . WPINC . '/registration.php');
require_once dirname( __FILE__ ) . '/functions-clientuser.php';
?>
<!-- hearder -->
<?php get_header(); ?>
<div id="content">
	<div class="left">
		<h2><img style="padding:3px; border:1px #dbdbdb solid; margin-right:10px;" src="images/user-img1.jpg" alt=""/>Your Profile</h2>
        
        <div class="info">
        	<p>Try to be as detailed as possible in formuling your question and describing it. <br />Choosing tags carefully will also help you in getting the right answers as soon as posible.</p>
        </div>
        
        <div class="question-form">
        	<div class="hl">
        		<h4>Your Profile</h4>
        		<div class="btn-group">
        			<span class="yut-btn-secondary">
        				<a class="smac" href="<?php bloginfo('url'); ?><?php if($user_ID > 0) echo '/?action=profile_edit';?>">Edit</a>
        			</span>
        		</div>
        	</div>
        	<?php 	
				
        	if($user_ID == 0)
					$user_ID = $_SESSION['user_id_yer'];				
					
					$profileuser = get_user_to_edit($user_ID);
					$user_avata = get_user_meta($user_ID,'avatar',true );
			?>
        	<table cellspacing="0" width="100%" class="edit">
        		<tbody>
        			<tr>
        				<td style="width:20%;background-color:#E7EEF4; border-bottom:1px solid #D0D0D0;">User Name</td>
        				<td style="width:73.5%; border-bottom:1px solid #D0D0D0;"><?=$profileuser->nickname ?></td>
        			</tr>
        			
        			<tr>
        				<td style="width:20%;background-color:#E7EEF4; border-bottom:1px solid #D0D0D0;">First Name</td>
        				<td style="width:73.5%; border-bottom:1px solid #D0D0D0;"><?=$profileuser->first_name ?></td>
        			</tr>
        			
        			<tr>
        				<td style="width:20%;background-color:#E7EEF4; border-bottom:1px solid #D0D0D0;">Last Name</td>
        				<td style="width:73.5%; border-bottom:1px solid #D0D0D0;"><?=$profileuser->last_name ?></td>
        			</tr>
               			
        			<tr>
        				<td style="width:20%;background-color:#E7EEF4; border-bottom:1px solid #D0D0D0;">Your Email</td>
        				<td style="width:73.5%; border-bottom:1px solid #D0D0D0;"><?=$profileuser->user_email ?></td>
        			</tr>    	
        			        		
        			<tr>
        				<td valign="top" style="width:20%; background-color:#E7EEF4; border-bottom:1px solid #D0D0D0;">Your Avatar</td>
        				<td style="width:73.5%; border-bottom:1px solid #D0D0D0;"><img src="wp-content/uploads/<?php echo $user_avata; ?>" width="58px" height="59" /></td>
        			</tr>
        		</tbody>
        	</table>
        </div>
    </div>  
<!-- sidebar -->
	<?php get_sidebar(); ?>    
</div>

<!-- footer -->	    
<?php get_footer(); ?>	
